import java.util.Arrays;

public class Solution2347 {
    public String bestHand(int[] ranks, char[] suits) {
        if (suits[0]==suits[1] && suits[1]==suits[2] && suits[2]==suits[3] && suits[3]==suits[4]){
            return "Flush";
        }else {
            Arrays.sort(ranks);
            if (ranks[0]==ranks[1] && ranks[1]==ranks[2] ||
            ranks[1]==ranks[2] && ranks[2]==ranks[3] ||
            ranks[2]==ranks[3] && ranks[3]==ranks[4]){
                return "Three of a Kind";
            }else if (ranks[0]==ranks[1] || ranks[1]==ranks[2] || ranks[2]==ranks[3] || ranks[3]==ranks[4]){
                return "Pair";
            }else {
                return "High Card";
            }
        }
    }

    public static void main(String[] args) {
        System.out.println(new Solution2347().bestHand(new int[]{13,2,3,1,9},new char[]{'a','a','a','a','a'}));
    }
}
